import type { IList, IResult } from "@/types/common";
import { getAxios, commonAxiosJson, exportExcelAxios } from "@/utils/request.js";
/* 获取 广告类型信息 地址*/
const url = "/back/business-affairs-record";
/* 查询 商务回访信息 */
export const getBusinessAffairsRecordInfo = <T, D>(params?: D): Promise<IResult<IList<T>>> => {
  return getAxios<IList<T>, D>(url, params);
};
/* 获取商务信息 */
export const getBusinessAffairsInfo = <T, D>(params?: D): Promise<IResult<T>> => {
  return getAxios<T, D>(url + "/get-business-affairs-list", params);
};
/* 新增 商务回访信息 */
export const commonBusinessAffairsRecordInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url, params, "POST");
};
/* 导出 商务回访信息 */
export const putBusinessAffairsRecordExportInfo = <D>(params: D): Promise<Blob> => {
  return exportExcelAxios<D>(url + "/export", "GET", params);
};
